#ifndef _drv_led_sw_h
#define _drv_led_sw_h

#include "n32g430.h"

#define LED_SW_PERIPH_GPIO   RCC_AHB_PERIPH_GPIOB
#define LED_SW_GPIO          GPIOB
#define LED_PIN        GPIO_PIN_10
#define SW1_PIN        GPIO_PIN_2
#define SW2_PIN         GPIO_PIN_1
#define SW3_PIN         GPIO_PIN_0

#define LED_ON         0
#define LED_OFF        1

#define SW1_SHORT_PRESS    0x01  //0000 0001
#define SW1_LONG_PRESS     0x02  //0000 0010
#define SW2_SHORT_PRESS    0x04  //0000 0100
#define SW2_LONG_PRESS     0x08  //0000 1000
#define SW3_SHORT_PRESS    0x10  //0001 0000
#define SW3_LONG_PRESS     0x20  //0010 0000

void DPM_LedSwInit(void);
void DPM_LedSet(uint8_t state);
uint8_t DPM_SwInforRead(void);

//放在5ms定时器中断中
void DPM_SwScan(void);

#endif 

